package com.deer.wms.ware.task.service;

import com.deer.wms.intercept.common.data.CurrentUser;
import com.deer.wms.project.root.service.SuperService;
import com.deer.wms.ware.task.model.SO.SoMaster;
import com.deer.wms.ware.task.model.SO.SoMasterDto;
import com.deer.wms.ware.task.model.Wave.WaveMaster;
import com.deer.wms.ware.task.model.Wave.WaveMasterCriteria;
import com.deer.wms.ware.task.model.Wave.WaveMasterDto;

import java.util.List;


/**
 *
 * @author ll
 * @since 2020/02/02
 */
public interface WaveMasterService extends SuperService<WaveMaster> {
    /**
     * 定时任务生成波次
     * @return boolean
     */
    boolean generateWaves();

    /**
     * 设置波次状态
     */
    void waveState();

    List<WaveMaster> findByState(Integer state);

    List<WaveMaster> findByStateNo0(   );

    List<WaveMasterDto> findList(WaveMasterCriteria criteria);

    List<WaveMasterDto> allotWave(WaveMasterCriteria criteria);

    //========如高的波次方法

    /**
     * 合并出库任务，生成波次（配料单）
     * @param soMasterList 待合并的出库任务
     * @param currentUser 当前用户
     * @return 合并生成的波次（配料单）
     */
    WaveMaster mergeSo(List<SoMasterDto> soMasterList, CurrentUser currentUser);

}